#!/bin/bash
# Script for publising release images of the Judge0 API.
# 
# Usage: ./scripts/dev/publish
#
set -xe

image=judge0/api
commit_tag="$(git tag --points-at HEAD)"
commit_tag=${commit_tag:1} # Drop the "v" at the beginning.

./scripts/dev/tag

docker push $image:$commit_tag
docker push $image:latest

docker push $image:$commit_tag-dev
docker push $image:latest-dev
